<form nz-form [formGroup]="validateForm" (ngSubmit)="createNew()">
    <div nz-form-item nz-row>
        <div nz-form-label nz-col [nzSm]="6" [nzXs]="24">
            <label for="oilCardNo" nz-form-item-required>油卡号码</label>
        </div>
        <div nz-form-control nz-col [nzSm]="14" [nzXs]="24" nzHasFeedback>
            <div *ngIf="type != 2">
                <nz-input [nzSize]="'large'" formControlName="oilCardNo" [nzId]="'oilCardNo'"></nz-input>
                <div nz-form-explain *ngIf="getFormControl('oilCardNo').dirty&&getFormControl('oilCardNo').hasError('oilCardNo')">请输入油卡号码！</div>
            </div>
            <div *ngIf="type == 2">
                <label>{{view.oilCardNo}}</label>
            </div>
        </div>
    </div>
    <div nz-form-item nz-row>
        <div nz-form-label nz-col [nzSm]="6" [nzXs]="24">
            <label for="deadLine" nz-form-item-required>油卡有效期</label>
        </div>
        <div nz-form-control nz-col [nzSm]="14" [nzXs]="24" nzHasFeedback>
            <div *ngIf="type != 2">
                <nz-datepicker formControlName="deadLine" nzShowTime [nzPlaceHolder]="'选择时间'" [nzFormat]="'YYYY-MM-DD'"></nz-datepicker>
                <div nz-form-explain *ngIf="getFormControl('deadLine').dirty&&getFormControl('deadLine').hasError('required')">请选择油卡有效期！</div>
            </div>
            <div *ngIf="type == 2">
                <label>{{view.deadLine}}</label>
            </div>
        </div>
    </div>
    <div nz-form-item nz-row>
        <div nz-form-label nz-col [nzSm]="6" [nzXs]="24">
            <label for="oilCardStatus" nz-form-item-required>状态</label>
        </div>
        <div nz-form-control nz-col [nzSm]="14" [nzXs]="24" nzHasFeedback>
            <div *ngIf="type != 2">
                <nz-radio-group formControlName="oilCardStatus">
                    <label nz-radio [nzValue]="'1'">
                        <span>正常</span>
                    </label>
                    <label nz-radio [nzValue]="'2'">
                        <span>停用</span>
                    </label>
                    <label nz-radio [nzValue]="'3'">
                        <span>异常</span>
                    </label>
                </nz-radio-group>
                <div nz-form-explain *ngIf="getFormControl('oilCardStatus').dirty&&getFormControl('oilCardStatus').hasError('required')">请选择状态！</div>
            </div>
            <div *ngIf="type == 2">
                <label *ngIf="view.oilCardStatus == 1">正常</label>
                <label *ngIf="view.oilCardStatus == 2">停用</label>
                <label *ngIf="view.oilCardStatus == 3">异常</label>
            </div>
        </div>
    </div>
    <div nz-form-item nz-row class="clearfix" *ngIf="type == 2">
        <div *ngIf="type == 2">
            <div nz-form-label nz-col [nzSm]="6" [nzXs]="24">
                <label for="oilCardNo" nz-form-item-required>录入时间</label>
            </div>
            <div nz-form-control nz-col [nzSm]="14" [nzXs]="24" nzHasFeedback>
                <label>{{view.createTime}}</label>
            </div>
        </div>
    </div>
    <div nz-form-item nz-row>
        <div nz-form-label nz-col [nzSm]="6" [nzXs]="24">
            <label for="remark" nz-form-item-required>备注</label>
        </div>
        <div nz-form-control nz-col [nzSm]="14" [nzXs]="24" nzHasFeedback>
            <div *ngIf="type != 2">
                <nz-input formControlName="remark" [nzType]="'textarea'" [nzRows]="'4'" [nzPlaceHolder]="''"></nz-input>
                <div nz-form-explain *ngIf="getFormControl('remark').dirty&&getFormControl('remark').hasError('required')">请输入备注！</div>
            </div>
            <div *ngIf="type == 2">
                <label>{{view.remark}}</label>
            </div>
        </div>
    </div>
    <div nz-form-item nz-row style="margin-bottom:8px;">
        <div nz-form-control nz-col [nzSpan]="14" [nzOffset]="6">
            <div *ngIf="type != 2">
                <button nz-button [nzSize]="'large'" [nzType]="'primary'">保存</button>
            </div>
            <!-- <div *ngIf="type == 2">
    <button nz-button [nzSize]="'large'" [nzType]="'primary'" routerLink="../oil">返回</button>
</div> -->
        </div>
    </div>
</form>